package com.betterwood.dragon.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;
import org.springframework.data.annotation.Id;
import org.springframework.data.annotation.LastModifiedDate;
import org.springframework.data.mongodb.core.mapping.DBRef;
import org.springframework.data.mongodb.core.mapping.Document;
import org.springframework.format.annotation.DateTimeFormat;
import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.List;

/**
 * <p>
 * 用户
 * </p>
 */
@Data
@Document("keywords")
public class Keyword implements Serializable {

    /**
     *
     */
    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    @Id
    @JsonProperty("id")
    private String id;

    /**
     * 关键词名称
     */
    private String keyWordStr;

    /**
     * 状态, 1为可用, 0为不可用
     */
    private Integer status = 0;

    /**
     * 关键词的价格列表
     */
    private List<String> priceList;

    /**
     * 关键词被应用于网站的列表
     */
    @DBRef(lazy = true)
    @JsonIgnoreProperties("keywords")
    private List<Site> sites;

}
